import java.util.Scanner;

public class HelloWorldMenu
{
	
	public static void main(String[] args)
	{
		Scanner input = new Scanner(System.in);
		String users = ("");
		System.out.println("Welcome to the menu!");
		while (!users.equals("q"))
		{
			System.out.println("------------------------");
			System.out.println("Please make a selection.");
			System.out.println("(a)dd");
			System.out.println("(s)ubtract");
			System.out.println("(m)ultiply");
			System.out.println("(d)ivide");
			System.out.println("(q)uit");
			System.out.print("Selection:");
			users = input.next();
			switch (users)
			{
				case "a":
					System.out.println("You selected add!");
					System.out.print("Enter your first number: ");
					String numstr = input.next();
					int num = Integer.parseInt(numstr);
					
					System.out.print("Enter your second number: ");
					String numstr2 = input.next();
					int num2 = Integer.parseInt(numstr2);
					System.out.println(num + "+" + num2 + "=" + (num + num2));
					break;
				case "s":
					System.out.println("You selected subtract!");
					System.out.print("Enter your first number: ");
					String numstrs = input.next();
					int nums = Integer.parseInt(numstrs);
					
					System.out.print("Enter your second number: ");
					String numstr2s = input.next();
					int nums2 = Integer.parseInt(numstr2s);
					System.out.println(nums + "-" + nums2 + "=" + (nums - nums2));
					break;
				case "m":
					System.out.println("You selected multiply!");
					System.out.print("Enter your first number: ");
					String numstrm = input.next();
					int numm = Integer.parseInt(numstrm);
					
					System.out.print("Enter your second number: ");
					String numstrm2 = input.next();
					int numm2 = Integer.parseInt(numstrm2);
					System.out.println(numm + "x" + numm2 + "=" + (numm * numm2));
					break;
				case "d":
					System.out.println("You selected divide!");
					System.out.print("Enter your first number: ");
					String numstrd = input.next();
					double numd = Double.parseDouble(numstrd);
					
					System.out.print("Enter your second number: ");
					String numstrd2 = input.next();
					double numd2 = Double.parseDouble(numstrd2);
					System.out.println(numd + "/" + numd2 + "=" + (numd/numd2));
					break;
				case "q":
					System.out.println("You selected quit!");
					break;
			}
			
		}
	}
	
}
